#include <stdio.h>
#include <stdlib.h>

#define N 25

float Ave(float x[], int n);//1
int Count(float x[], int n);//1

int main()
{		  
    int n, i=0;
    printf("The number of month is:\n");
    scanf("%d", &n);

    printf("Enter precipitation between(0<=p<=250):\n");
    float rainfall[N];

    for(i=0; i<n; ++i)//1
    {		  
        scanf("%f", &rainfall[i]);//1
    }

    printf("The average of precipitation is %.2f\n", Ave(rainfall, n));//1
    printf("The number above 50mm and below 150mm is %d\n", Count(rainfall, n));//1
    
    return 0;
}		  

float Ave(float x[], int n)
{		  
    float result = 0;//1
    int i=0;//1
    if(n==0)//1
        return 0;//1
        
    for(i=0; i<n; ++i)//1
    {		  
      
        result += x[i];//1
    }
    return result/n;//1
}		  

int Count(float x[], int n)
{		  
    int count = 0, i = 0;//1
    for(i=0; i<n; ++i)//1
    {		  
        if(x[i] >= 50 && x[i] < 150)//1
            ++count;//1
    }
    return count;//1
}		  